Skip to content

fix(web): keep minimap scroll updates out of the timeline - #39613

Open
heyadhithya wants to merge 2 commits into
pingdotgg:mainfrom
heyadhithya:fix/timeline-minimap-scroll-renders
Open

heyadhithya wants to merge 2 commits into
pingdotgg:mainfrom
heyadhithya:fix/timeline-minimap-scroll-renders

Conversation

@heyadhithya

Copy link
Copy Markdown

Problem

Scrolling a long thread changes the minimap's current turn. That state update re-renders the whole conversation timeline and virtualized list, even though only the minimap navigation controls depend on it.

Change

Keep the current turn and bottom position in a store scoped to the timeline. Only the minimap subscribes to it. The same scroll measurements still drive the controls.

Scope

Addresses one source of extra renders related to #39545 in the web client shared by the desktop app.

Verification

On Omarchy Linux, mounted the real timeline in headless Chromium with 320 synthetic turns. Starting at the bottom, scrolled to the top and five evenly spaced positions, letting each move settle. T3's React render counter reported:

Component Before After
Conversation timeline 6 0
Virtualized list 6 0
Minimap 6 6

All three existing minimap browser tests passed, covering Previous/Next navigation, restoring a thread above the bottom, and bottom detection after resize or footer growth. pnpm exec node scripts/check-changed.ts origin/main passed, including 196 timeline tests, React Compiler coverage, type checking, lint, formatting, and Knip.

The render counts measure React work. End-to-end desktop frame timing and the remaining list measurement cost from #39545 were outside this check.

Agent: OpenAI GPT-6.2 Sol via Codex in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c32014d and d67639e.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

MessagesTimeline now keeps minimap position in a Zustand store and updates it only when the calculated index or end status changes. TimelineMinimap receives the store and reads both values from it.

Changes: Minimap position state

Layer / File(s) Summary
Store contract and minimap subscription
apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/TimelineMinimap.tsx
TimelineMinimapPosition defines the store values. MessagesTimeline creates and updates the store when either value changes, then passes it to TimelineMinimap, which reads the values with useStore.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Possibly related issues

  • pingdotgg/t3code#39545 — The changes address one source of timeline re-renders during scrolling, but do not address the issue’s remaining legend-list work.

Possibly related PRs

Suggested reviewers: juliusmarminge, macroscopeapp, maria-rcks

Merge Risk: Minimal · previous review c3201

This change keeps minimap scroll-state updates from re-rendering the conversation timeline. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: minimap scroll-state updates are kept out of the timeline, which matches the raw summary and objectives (store-scoped current turn and bottom position, subscribed only…
Description check Passed The description covers the required template sections: Problem, Change, Scope, and Verification. The problem and change are clear and the scope links the related issue #39545. Verification is detailed…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: minimap scroll-state updates are kept out of the timeline, which matches the raw summary and objectives (store-scoped current turn and bottom position, subscribed only by the minimap). The title follows the conventional commit form and is specific, so it passes.

Full details: Description check

Explanation

The description covers the required template sections: Problem, Change, Scope, and Verification. The problem and change are clear and the scope links the related issue #39545. Verification is detailed, with a before/after render-count table, the browser tests run, and the repo check command. It also states what was not measured (end-to-end frame timing). The UI-change screenshot requirement is not met, since the render counts are numeric rather than before/after screenshots. The Scope section also does not say why this is a bug fix rather than a feature, nor does it link a specific bug issue, only #39545 as related. The agent attribution is present. Overall the description is mostly complete.

Resolution

Optional improvements: link the specific bug issue in Scope (or explain why none is needed), and clarify whether the change alters any user-visible UI. If it does, add before/after screenshots or a recording as the template requests.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e963572 and c32014d.

Files selected for processing: 2

  • apps/web/src/components/chat/MessagesTimeline.tsx
  • apps/web/src/components/chat/TimelineMinimap.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 20, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the capture step could not show the problem on the base commit, so there is nothing to prove fixed.

After seeding completed, reload the thread before each repetition. Scroll to the top and click Load earlier turns until absent; verify 320 minimap strips and no running turn. Scroll to the bottom and wait for 600 ms without a React commit. Measure a no-scroll control, reset counters, then set scrollTop to 0/6 through 5/6 of the scroll range, waiting for quiet after every move. Repeat seven times on each commit. Separately record the same sequence and check Next, Previous, strip midpoint selection, keyboard End/Enter, keyboard Home/Enter, and wheel forwarding.

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants